﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace msBsc.WebUi.wMall.Public
{
    public partial class wfTravelFoodInfo : msBsc.Cls.BPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindControls();
            }
        }
        private void BindControls()
        {
            if (!IsPostBack)
            {
            }
        }

        private void GetFoodInfo()
        {
            string foodId= this.GetParamHtValue("foodId");
            if (string.IsNullOrEmpty(foodId))
            {
                //this.ExecJScript(@"window.location.h");
                return;
            }
            using (msBsc.AppLogic.DataAlc.CBizPushNiceFood niceFood=new AppLogic.DataAlc.CBizPushNiceFood())
            {
                DataSet ds = niceFood.GetNiceFoodByIdWithPrevNext(foodId);
                if (ds == null || ds.Tables[0].Rows.Count < 1)
                {
                    return;
                }
                string strjson = msBsc.AppLogic.Cfg.HttpTools.GetJsonByTable(ds.Tables[0], "", "", 1, 20, "");
                this.ExecJScript(@"setScenicInfo(" + strjson + @");");
            }
        }

        public override void DoAction()
        {
            if (this.strAction == "init")
            {
                GetFoodInfo();
                base.DoAction();
            }
        }
    }
}